<template>
  <el-card>
    <avue-crud
      ref="crudRef"
      v-model="tableForm"
      :option="option"
      v-model:page="page"
      :table-loading="tableLoading"
      @row-save="rowSave"
      @row-update="rowUpdate"
      @row-del="rowDel"
      @refresh-change="loadData(1)"
      @search-reset="searchChange"
      @search-change="searchChange"
      @on-load="loadData(1)"
      :data="tableData"
    />
  </el-card>
</template>
<script setup lang="ts">
import { UserManageAPI } from "@/api/system";
import { useAvueTableMixin } from "@/mixins/avueTableMixin";
const {
  tableForm,
  page,
  tableLoading,
  tableData,
  params,
  staticParams,
  loadData,
  rowSave,
  rowUpdate,
  rowDel,
  searchChange,
} = useAvueTableMixin(UserManageAPI);
const option = ref({
  index: true,
  searchMenuSpan: 8,
  column: [
    { prop: "userName", label: "用户姓名", type: "input", search: true },
    { prop: "telephone", label: "手机号", type: "number" },
    { prop: "password", label: "密码", hide: true },
  ],
});
</script>
<style lang="scss" scoped></style>
